ISLR-Python | Notes and implementations in Python for ISLR | Machine Learning library
kandi X-RAY | ISLR-Python Summary
kandi X-RAY | ISLR-Python Summary
Notes and implementations in Python for ISLR.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ISLR-Python
ISLR-Python Key Features
ISLR-Python Examples and Code Snippets
Community Discussions
Trending Discussions on ISLR-Python
QUESTION
I'm fitting a Linear Discriminant Analysis model using the stock market data (Smarket.csv) from here. I'm trying to predict Direction
with columns Lag1
and Lag2
. Direction
has two values: Up
or Down
.
Here is my reproducible code and the result:
...ANSWER
Answered 2021-Apr-03 at 13:33Although I cannot find an explicit reference in the documentation (I'm sure there is a general one, somewhere), in such cases the classes are ordered alphabetically, ie. in your case it is ['Down', 'Up']
.
You can easily verify that this is consistent with your results here; since the priors_
attribute is just passed through the priors
argument, which, according to the documentation, is just the class proportions as inferred from the training data (when priors=None
, like here):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ISLR-Python
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page